<template>
  <div>
    mailList:
    <div v-for="user in mailList" v-bind:key="user">{{ user.id }} - {{ user.name }} - {{ user.age }} - {{ user.gender }}</div>

    <div style="margin-top: 50px"/>
    adultPeoples：
    <div v-for="user in adultPeoples" v-bind:key="user">{{ user.id }} - {{ user.name }} - {{ user.age }} - {{ user.gender }}</div>

  </div>
</template>


<script>
import {mapGetters} from 'vuex'
export default {
  computed: {
    mailList() {
        return this.$store.getters.maleList
    },
    // 给getters传参
    adultPeoples() {
      return this.$store.getters.olderThan(20)
    },
    ...mapGetters(['femaleList'])

  }

}
</script>